<link type="text/css" rel="stylesheet" href="{$themeDir}public/fb.css" />
<include file="Public:left" />
		<div class="clearfix cont">
		<form class="ajaxform" action="/index.php?m=Post&a=guestbook&l=<?php echo LANG_NAME; ?>" method="post">
		<table cellpadding="0" cellspacing="0" border="0" class="fb-table">
			<tr>
				<td>Your name</td><td><input type="text" value="" name="title" required="required" />*</td>
			</tr>
			<tr>
				<td>Company name</td><td><input type="text" name="company" value="" /></td>
			</tr>
			<tr>
				<td>Add</td><td><input type="text" name="country" value="" /></td>
			</tr>
			<tr>
				<td>Tel</td><td><input type="text" name="telephone" value="" /></td>
			</tr>
			<tr>
				<td>E-mail</td><td><input type="text" name="email" value="" required="required" />*</td>
			</tr>
			<tr>
				<td>skype</td><td><input type="text" name="ip" value="" /></td>
			</tr>
			<tr>
				<td>Content</td><td><textarea name="content"></textarea></td>
			</tr>
			<tr><td>&nbsp;</td><td>
				<input type="hidden" value="<?php echo LANG_ID; ?>" name="lang" />
<input type="hidden" value="0" name="status" />
<input type="submit" value="Submit" class="submit"  />
			</td></tr>
		</table>
		</form>
		</div>
	</div>
</div>
<input type="hidden" id="postsign" value="0" />
<script type="text/javascript" src="/public/Js/jquery.validate.min.js"></script>
<script type="text/javascript" src="/public/Js/jquery.validate.method.js"></script>
<script type="text/javascript" src="/public/Js/jquery.form.js"></script>
<script type="text/javascript">
$(document).ready(function(){
	$(".ajaxform").validate({
        submitHandler: function(form){
        	if($("#postsign").val() == 1){
        		alert("请不要重复提交");
        		return false;
        	}
            //form.submit();  
        	$(form).ajaxSubmit({
        		dataType: 'json',
                success:function(data){
                  //var data = eval("("+data+")");
    				if(data.error == 0){
    					//alert(data.message);
    					alert("Success!");
    					window.location.href='/';
    					$("#postsign").val(1);
    				}
    				if(data.error > 0){
    					alert(data.message);
    				}
                }
            });   
                  
        },
	});
}); 
</script>